package com.myacg.core.entity;

import com.myacg.core.utils.MoveUtils;

/**
 * 一个向量。 代表一个作用点， 一个方向，一个力度(也可以是长度)
 * @author guoshichang
 *
 */
public class Vector {
	public Point point;
	public double direction;
	public double force;
	public Vector(Point point) {
		super();
		this.point = point;
		direction=0;
		force=0;
	}
	public Vector(Point point, double direction, double force) {
		super();
		this.point = point;
		this.direction = direction;
		this.force = force;
	}
	
	/**
	 * 根据自身条件获取终点坐标
	 * @return
	 */
	public Point getEndPoint(){
		return MoveUtils.getNextOvalPoint(force, direction, point);
	}
	
	public Point getPoint() {
		return point;
	}
	public void setPoint(Point point) {
		this.point = point;
	}
	public double getDirection() {
		return direction;
	}
	public void setDirection(double direction) {
		this.direction = direction;
	}
	public double getForce() {
		return force;
	}
	public void setForce(double force) {
		this.force = force;
	}
}
